#!/bin/bash
set -x
while true; do
  go get "k8s.io/api/core/v1"
  if [ $? -ne 0 ]; then
    echo 1...
    sleep 1000
    continue
  fi
  go get "k8s.io/client-go/kubernetes/scheme"
  if [ $? -ne 0 ]; then
    echo 2...
    sleep 1000
    continue
  fi

  go get "k8s.io/client-go/rest"
  if [ $? -ne 0 ]; then
    echo 3...
    sleep 1000
    continue
  fi

  go get "k8s.io/client-go/tools/clientcmd"
  if [ $? -ne 0 ]; then
    echo 4...
    sleep 1000
    continue
  fi
  break

done
